export default {
    name: 'SceneDialog',
    props: {
        rebootFlag: Boolean,
        accountId: Number
    },
    data() {
        return {
            // 退单原因
            chargebackReason: ''
        };
    },
    methods: {
        clonseDialog() {
            this.$emit('closeDialog');
        },
        // 启动账户
        async quitOrder() {
            this.$httpExt()
                .post('/api/pmsSupplierAccount/startUsing', {
                    id: this.accountId
                })
                .then(
                    response => {
                        console.log('返回值', response.data);
                        this.$message({
                            message: '该账户已启用',
                            type: 'success'
                        });
                        this.$emit('closeDialog');
                    },
                    response => {
                        Notification.error({
                            title: '异常',
                            message: response.msg
                        });
                    }
                );
        }
    }
};
